home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / s-pooglo.ads < prev    next >
Text File  |  1996-01-30  |  3KB  |  68 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT COMPILER COMPONENTS                         --
  4. --                                                                          --
  5. --                   S Y S T E M . P O O L _ G L O B A L                    --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.4 $                              --
  10. --                                                                          --
  11. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  12. --                                                                          --
  13. -- The GNAT library is free software; you can redistribute it and/or modify --
  14. -- it under terms of the GNU Library General Public License as published by --
  15. -- the Free Software  Foundation; either version 2, or (at your option) any --
  16. -- later version.  The GNAT library is distributed in the hope that it will --
  17. -- be useful, but WITHOUT ANY WARRANTY;  without even  the implied warranty --
  18. -- of MERCHANTABILITY  or  FITNESS FOR  A PARTICULAR PURPOSE.  See the  GNU --
  19. -- Library  General  Public  License for  more  details.  You  should  have --
  20. -- received  a copy of the GNU  Library  General Public License  along with --
  21. -- the GNAT library;  see the file  COPYING.LIB.  If not, write to the Free --
  22. -- Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.        --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. with System;
  27. with System.Storage_Pools;
  28. with System.Storage_Elements;
  29.  
  30. package System.Pool_Global is
  31.  
  32. pragma Elaborate_Body;
  33. --  Needed to ensure that library routines can execute allocators
  34.  
  35.    --  Allocation strategy:
  36.  
  37.    --    Call to malloc/free for each Allocate/Deallocate
  38.    --    no user specifiable size
  39.    --    no automatic reclaim
  40.    --    minimal overhead
  41.  
  42.    --  Default pool in the compiler for access types globally declared
  43.  
  44.    type Unbounded_No_Reclaim_Pool is new
  45.      System.Storage_Pools.Root_Storage_Pool with null record;
  46.  
  47.    function Storage_Size
  48.      (Pool : Unbounded_No_Reclaim_Pool)
  49.       return System.Storage_Elements.Storage_Count;
  50.  
  51.    procedure Allocate
  52.      (Pool         : in out Unbounded_No_Reclaim_Pool;
  53.       Address      : out System.Address;
  54.       Storage_Size : System.Storage_Elements.Storage_Count;
  55.       Alignment    : System.Storage_Elements.Storage_Count);
  56.  
  57.    procedure Deallocate
  58.      (Pool         : in out Unbounded_No_Reclaim_Pool;
  59.       Address      : System.Address;
  60.       Storage_Size : System.Storage_Elements.Storage_Count;
  61.       Alignment    : System.Storage_Elements.Storage_Count);
  62.  
  63.    --  Pool object for the compiler
  64.  
  65.    Global_Pool_Object : Unbounded_No_Reclaim_Pool;
  66.  
  67. end System.Pool_Global;
  68.